//
//  WTabViewController.m
//  xmpp即时通信
//
//  Created by student on 16/1/23.
//  Copyright © 2016年 123. All rights reserved.
//

#import "WTabViewController.h"
#import "WNavgationViewController.h"
#import "WWechatViewController.h"
#import "WMyController.h"

@implementation WTabViewController

- (void)viewDidLoad
{
    WWechatViewController *weChat = [[WWechatViewController alloc]init];
    [self setTabWithViewController:weChat title:@"首页" image:nil selectedImage:nil];
    
    WMyController *my = [[WMyController alloc]init];
    [self setTabWithViewController:my title:@"个人信息" image:nil selectedImage:nil];
    
}

- (void)setTabWithViewController:(UIViewController *)viewController title:(NSString *)title image:(NSString *)image selectedImage:(NSString *)selectedImage
{
    WNavgationViewController *nav = [[WNavgationViewController alloc]initWithRootViewController:viewController];
    nav.tabBarItem.title = title;
    viewController.navigationItem.title = title;
    [self addChildViewController:nav];
}

@end
